<?php

/**
 * @copyright       : FOSP
 * @version         : 20120322
 * @todo            : Factory to object access table League
 * @name            : Fpt_Business_League
 * @author          : QuangTM
 */
class Fpt_Business_League
{
    protected function __construct()
    {
        ;
    }
    
    protected function __clone()
    {
        ;
    }

    /**
     * Get abstract to access table League
     * @param array $options
     * @return Fpt_Business_League_Adapter_Abstract 
     */
    public static function factory($options)
    {
        $className = $options['adapter'];
        if (empty($className))
        {
            return Fpt_Server::setOutputData(-1, 'empty class name', null);
        }
        $className = __CLASS__ . '_Adapter_' . ucfirst(strtolower($className));
        return call_user_func(array($className, 'getInstance'));
    }
}